package com.hwl.ucenter.controller.admin;

import com.hwl.commonutils.result.RespBean;
import com.hwl.ucenter.service.MemberService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@Api(tags = "用户管理")
@RestController
@RequestMapping("/admin/ucenter")
public class MemberController {

    @Resource
    private MemberService memberService;

    @ApiOperation("根据日期统计注册人数")
    @GetMapping("countRegister/{day}")
    public RespBean countRegisterNum(@PathVariable String day) {
        return RespBean.ok().data(memberService.countRegisterNum(day));
    }
}
